package com.util.gzp.config;

import lombok.extern.slf4j.Slf4j;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * ClassName: FindFilter
 * Package: com.util.gzp.config
 *
 * @author: guanzepeng
 * @Date: 2021/3/25 17:36 星期四
 * @Description: 查看被拦截的静态资源路径, 取消掉注释并且给启动类添加@ServletComponentScan注解后才会生效
 */
@Slf4j
//@WebFilter(filterName = "filter1", urlPatterns = {"/*"})
public class FindFilter implements Filter {

	@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
		HttpServletRequest request1 = (HttpServletRequest) request;
		log.info(request1.getRequestURI()+"-------------------");
		chain.doFilter(request,response);
	}
}
